from django.urls import path

from home_design.views.inspiration_view import InspirationListView, InspirationDetailView, \
    InspirationClassificationView, MyInspirationListView
from home_design.views.inspirationcomment_view import InspirationCommentDetailView, InspirationCommentCreateView
from home_design.views.inspirationfavorite_view import \
    InspirationFavoriteStyleListView, InspirationFavoriteView
from home_design.views.inspirationvoting_view import InspirationVotingView
from home_design.views.statistics_view import BestInspirationOfTheWeekView, BestStyleOfTheWeekView, \
    TopInspirationUserView, TopStyleUserView
from home_design.views.style_view import MyStyleListView, StyleListView, StyleClassificationView, StyleDetailView
from home_design.views.stylecomment_view import StyleCommentCreateView, StyleCommentDetailView
from home_design.views.stylefavorite_view import StyleFavoriteView
from home_design.views.stylevoting_view import StyleVotingView

urlpatterns = [
    #_________灵感全局_________
    path('inspirations/', InspirationListView.as_view(), name='inspiration-list'),  # 灵感列表和创建新灵感
    path('my/inspirations/', MyInspirationListView.as_view(), name='my-inspiration-list'),  # 用户创建的灵感列表
    path('inspirations/<int:pk>/', InspirationDetailView.as_view(), name='inspiration-detail'),  # 单个灵感的详细信息、更新和删除
    path('inspirations/classification/<int:classification>/', InspirationClassificationView.as_view(), name='inspiration-classification_list'),  # 灵感列表分类列表
    path('inspirations/comment/<int:inspiration_pk>/', InspirationCommentDetailView.as_view(), name='inspiration-comment_list'),  # 单个灵感的评论列表
    path('inspirations/comment/', InspirationCommentCreateView.as_view(), name='inspiration-comment_create'),  # 单个灵感的评论的创建
    path('inspirations/<int:inspiration_id>/favorite/', InspirationFavoriteView.as_view(), name='inspiration-favorite_create_or_cancel'),  # 灵感收藏创建/取消收藏
    path('favorites/styles/', InspirationFavoriteStyleListView.as_view(), name='inspiration-favorite_style_list'), # 用户收藏的全局灵感+单品风格列表
    path('inspirations/<int:inspiration_id>/voting/', InspirationVotingView.as_view(), name='inspiration-voting_create_or_cancel'), # 单个灵感投票创建/取消投票
    #_________设计单品_________
    path('my/styles/', MyStyleListView.as_view(), name='my-style-list'),  # 用户创建的设计单品列表
    path('styles/classification/<int:classification>/', StyleClassificationView.as_view(),name='style-classification_list'),  # 单品设计列表分类列表
    path('styles/', StyleListView.as_view(), name='style-list'),  # 设计单品列表和创建新设计单品
    path('styles/<int:pk>/', StyleDetailView.as_view(), name='styles-detail'),  # 单个设计单品的详细信息、更新和删除
    path('styles/comment/', StyleCommentCreateView.as_view(), name='style-comment_create'),  # 单个设计单品的评论的创建
    path('styles/comment/<int:style_pk>/', StyleCommentDetailView.as_view(), name='style-comment_list'),  # 单个设计单品的评论列表
    path('styles/<int:style_id>/favorite/', StyleFavoriteView.as_view(),name='style-favorite_create_or_cancel'), # 设计单品收藏创建/取消收藏
    path('styles/<int:style_id>/voting/', StyleVotingView.as_view(),name='style-voting_create_or_cancel'), # 设计单品投票创建/取消投票
    #_________数据统计_________
    path('inspirations/best_of_week/', BestInspirationOfTheWeekView.as_view(), name='best-inspiration-of-week'),
    path('styles/best_of_week/', BestStyleOfTheWeekView.as_view(), name='best-style-of-week'),
    path('inspirations/top_inspiration_user/', TopInspirationUserView.as_view(), name='top_inspiration_user'),
    path('styles/top_style_user/', TopStyleUserView.as_view(), name='top_style_user'),
]
